/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudm_SDM
 * Nudm Subscriber Data Management Service. � 2019, 3GPP Organizational Partners
 * (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.0.alpha-1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "AccessAndMobilitySubscriptionData.h"

namespace oai {
namespace udm {
namespace model {

AccessAndMobilitySubscriptionData::AccessAndMobilitySubscriptionData() {
  m_SupportedFeatures                = "";
  m_SupportedFeaturesIsSet           = false;
  m_GpsisIsSet                       = false;
  m_InternalGroupIdsIsSet            = false;
  m_SubscribedUeAmbrIsSet            = false;
  m_NssaiIsSet                       = false;
  m_RatRestrictionsIsSet             = false;
  m_ForbiddenAreasIsSet              = false;
  m_CoreNetworkTypeRestrictionsIsSet = false;
  m_RfspIndex                        = 0;
  m_RfspIndexIsSet                   = false;
  m_SubsRegTimer                     = 0;
  m_SubsRegTimerIsSet                = false;
  m_UeUsageType                      = 0;
  m_UeUsageTypeIsSet                 = false;
  m_MpsPriority                      = false;
  m_MpsPriorityIsSet                 = false;
  m_McsPriority                      = false;
  m_McsPriorityIsSet                 = false;
  m_ActiveTime                       = 0;
  m_ActiveTimeIsSet                  = false;
  m_DlPacketCount                    = 0;
  m_DlPacketCountIsSet               = false;
  m_SorInfoIsSet                     = false;
  m_UpuInfoIsSet                     = false;
  m_MicoAllowed                      = false;
  m_MicoAllowedIsSet                 = false;
  m_SharedAmDataIdsIsSet             = false;
  m_OdbPacketServicesIsSet           = false;
  m_SubscribedDnnListIsSet           = false;
  m_ServiceGapTime                   = 0;
  m_ServiceGapTimeIsSet              = false;
  m_TraceDataIsSet                   = false;
}

AccessAndMobilitySubscriptionData::~AccessAndMobilitySubscriptionData() {}

void AccessAndMobilitySubscriptionData::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json& j, const AccessAndMobilitySubscriptionData& o) {
  j = nlohmann::json();
  if (o.supportedFeaturesIsSet())
    j["supportedFeatures"] = o.m_SupportedFeatures;
  if (o.gpsisIsSet()) j["gpsis"] = o.m_Gpsis;
  if (o.internalGroupIdsIsSet()) j["internalGroupIds"] = o.m_InternalGroupIds;
  if (o.subscribedUeAmbrIsSet()) j["subscribedUeAmbr"] = o.m_SubscribedUeAmbr;
  if (o.nssaiIsSet()) j["nssai"] = o.m_Nssai;
  if (o.ratRestrictionsIsSet()) j["ratRestrictions"] = o.m_RatRestrictions;
  if (o.forbiddenAreasIsSet()) j["forbiddenAreas"] = o.m_ForbiddenAreas;
  if (o.coreNetworkTypeRestrictionsIsSet())
    j["coreNetworkTypeRestrictions"] = o.m_CoreNetworkTypeRestrictions;
  if (o.rfspIndexIsSet()) j["rfspIndex"] = o.m_RfspIndex;
  if (o.subsRegTimerIsSet()) j["subsRegTimer"] = o.m_SubsRegTimer;
  if (o.ueUsageTypeIsSet()) j["ueUsageType"] = o.m_UeUsageType;
  if (o.mpsPriorityIsSet()) j["mpsPriority"] = o.m_MpsPriority;
  if (o.mcsPriorityIsSet()) j["mcsPriority"] = o.m_McsPriority;
  if (o.activeTimeIsSet()) j["activeTime"] = o.m_ActiveTime;
  if (o.dlPacketCountIsSet()) j["dlPacketCount"] = o.m_DlPacketCount;
  if (o.sorInfoIsSet()) j["sorInfo"] = o.m_SorInfo;
  if (o.upuInfoIsSet()) j["upuInfo"] = o.m_UpuInfo;
  if (o.micoAllowedIsSet()) j["micoAllowed"] = o.m_MicoAllowed;
  if (o.sharedAmDataIdsIsSet()) j["sharedAmDataIds"] = o.m_SharedAmDataIds;
  if (o.odbPacketServicesIsSet())
    j["odbPacketServices"] = o.m_OdbPacketServices;
  if (o.subscribedDnnListIsSet())
    j["subscribedDnnList"] = o.m_SubscribedDnnList;
  if (o.serviceGapTimeIsSet()) j["serviceGapTime"] = o.m_ServiceGapTime;
  if (o.traceDataIsSet()) j["traceData"] = o.m_TraceData;
}

void from_json(const nlohmann::json& j, AccessAndMobilitySubscriptionData& o) {
  if (j.find("supportedFeatures") != j.end()) {
    j.at("supportedFeatures").get_to(o.m_SupportedFeatures);
    o.m_SupportedFeaturesIsSet = true;
  }
  if (j.find("gpsis") != j.end()) {
    j.at("gpsis").get_to(o.m_Gpsis);
    o.m_GpsisIsSet = true;
  }
  if (j.find("internalGroupIds") != j.end()) {
    j.at("internalGroupIds").get_to(o.m_InternalGroupIds);
    o.m_InternalGroupIdsIsSet = true;
  }
  if (j.find("subscribedUeAmbr") != j.end()) {
    j.at("subscribedUeAmbr").get_to(o.m_SubscribedUeAmbr);
    o.m_SubscribedUeAmbrIsSet = true;
  }
  if (j.find("nssai") != j.end()) {
    j.at("nssai").get_to(o.m_Nssai);
    o.m_NssaiIsSet = true;
  }
  if (j.find("ratRestrictions") != j.end()) {
    j.at("ratRestrictions").get_to(o.m_RatRestrictions);
    o.m_RatRestrictionsIsSet = true;
  }
  if (j.find("forbiddenAreas") != j.end()) {
    j.at("forbiddenAreas").get_to(o.m_ForbiddenAreas);
    o.m_ForbiddenAreasIsSet = true;
  }
  if (j.find("coreNetworkTypeRestrictions") != j.end()) {
    j.at("coreNetworkTypeRestrictions").get_to(o.m_CoreNetworkTypeRestrictions);
    o.m_CoreNetworkTypeRestrictionsIsSet = true;
  }
  if (j.find("rfspIndex") != j.end()) {
    j.at("rfspIndex").get_to(o.m_RfspIndex);
    o.m_RfspIndexIsSet = true;
  }
  if (j.find("subsRegTimer") != j.end()) {
    j.at("subsRegTimer").get_to(o.m_SubsRegTimer);
    o.m_SubsRegTimerIsSet = true;
  }
  if (j.find("ueUsageType") != j.end()) {
    j.at("ueUsageType").get_to(o.m_UeUsageType);
    o.m_UeUsageTypeIsSet = true;
  }
  if (j.find("mpsPriority") != j.end()) {
    j.at("mpsPriority").get_to(o.m_MpsPriority);
    o.m_MpsPriorityIsSet = true;
  }
  if (j.find("mcsPriority") != j.end()) {
    j.at("mcsPriority").get_to(o.m_McsPriority);
    o.m_McsPriorityIsSet = true;
  }
  if (j.find("activeTime") != j.end()) {
    j.at("activeTime").get_to(o.m_ActiveTime);
    o.m_ActiveTimeIsSet = true;
  }
  if (j.find("dlPacketCount") != j.end()) {
    j.at("dlPacketCount").get_to(o.m_DlPacketCount);
    o.m_DlPacketCountIsSet = true;
  }
  if (j.find("sorInfo") != j.end()) {
    j.at("sorInfo").get_to(o.m_SorInfo);
    o.m_SorInfoIsSet = true;
  }
  if (j.find("upuInfo") != j.end()) {
    j.at("upuInfo").get_to(o.m_UpuInfo);
    o.m_UpuInfoIsSet = true;
  }
  if (j.find("micoAllowed") != j.end()) {
    j.at("micoAllowed").get_to(o.m_MicoAllowed);
    o.m_MicoAllowedIsSet = true;
  }
  if (j.find("sharedAmDataIds") != j.end()) {
    j.at("sharedAmDataIds").get_to(o.m_SharedAmDataIds);
    o.m_SharedAmDataIdsIsSet = true;
  }
  if (j.find("odbPacketServices") != j.end()) {
    j.at("odbPacketServices").get_to(o.m_OdbPacketServices);
    o.m_OdbPacketServicesIsSet = true;
  }
  if (j.find("subscribedDnnList") != j.end()) {
    j.at("subscribedDnnList").get_to(o.m_SubscribedDnnList);
    o.m_SubscribedDnnListIsSet = true;
  }
  if (j.find("serviceGapTime") != j.end()) {
    j.at("serviceGapTime").get_to(o.m_ServiceGapTime);
    o.m_ServiceGapTimeIsSet = true;
  }
  if (j.find("traceData") != j.end()) {
    j.at("traceData").get_to(o.m_TraceData);
    o.m_TraceDataIsSet = true;
  }
}

std::string AccessAndMobilitySubscriptionData::getSupportedFeatures() const {
  return m_SupportedFeatures;
}
void AccessAndMobilitySubscriptionData::setSupportedFeatures(
    std::string const& value) {
  m_SupportedFeatures      = value;
  m_SupportedFeaturesIsSet = true;
}
bool AccessAndMobilitySubscriptionData::supportedFeaturesIsSet() const {
  return m_SupportedFeaturesIsSet;
}
void AccessAndMobilitySubscriptionData::unsetSupportedFeatures() {
  m_SupportedFeaturesIsSet = false;
}
std::vector<std::string>& AccessAndMobilitySubscriptionData::getGpsis() {
  return m_Gpsis;
}
bool AccessAndMobilitySubscriptionData::gpsisIsSet() const {
  return m_GpsisIsSet;
}
void AccessAndMobilitySubscriptionData::unsetGpsis() {
  m_GpsisIsSet = false;
}
std::vector<std::string>&
AccessAndMobilitySubscriptionData::getInternalGroupIds() {
  return m_InternalGroupIds;
}
bool AccessAndMobilitySubscriptionData::internalGroupIdsIsSet() const {
  return m_InternalGroupIdsIsSet;
}
void AccessAndMobilitySubscriptionData::unsetInternalGroupIds() {
  m_InternalGroupIdsIsSet = false;
}
AmbrRm AccessAndMobilitySubscriptionData::getSubscribedUeAmbr() const {
  return m_SubscribedUeAmbr;
}
void AccessAndMobilitySubscriptionData::setSubscribedUeAmbr(
    AmbrRm const& value) {
  m_SubscribedUeAmbr      = value;
  m_SubscribedUeAmbrIsSet = true;
}
bool AccessAndMobilitySubscriptionData::subscribedUeAmbrIsSet() const {
  return m_SubscribedUeAmbrIsSet;
}
void AccessAndMobilitySubscriptionData::unsetSubscribedUeAmbr() {
  m_SubscribedUeAmbrIsSet = false;
}
Nssai AccessAndMobilitySubscriptionData::getNssai() const {
  return m_Nssai;
}
void AccessAndMobilitySubscriptionData::setNssai(Nssai const& value) {
  m_Nssai      = value;
  m_NssaiIsSet = true;
}
bool AccessAndMobilitySubscriptionData::nssaiIsSet() const {
  return m_NssaiIsSet;
}
void AccessAndMobilitySubscriptionData::unsetNssai() {
  m_NssaiIsSet = false;
}
std::vector<RatType>& AccessAndMobilitySubscriptionData::getRatRestrictions() {
  return m_RatRestrictions;
}
bool AccessAndMobilitySubscriptionData::ratRestrictionsIsSet() const {
  return m_RatRestrictionsIsSet;
}
void AccessAndMobilitySubscriptionData::unsetRatRestrictions() {
  m_RatRestrictionsIsSet = false;
}
std::vector<Area>& AccessAndMobilitySubscriptionData::getForbiddenAreas() {
  return m_ForbiddenAreas;
}
bool AccessAndMobilitySubscriptionData::forbiddenAreasIsSet() const {
  return m_ForbiddenAreasIsSet;
}
void AccessAndMobilitySubscriptionData::unsetForbiddenAreas() {
  m_ForbiddenAreasIsSet = false;
}
std::vector<CoreNetworkType>&
AccessAndMobilitySubscriptionData::getCoreNetworkTypeRestrictions() {
  return m_CoreNetworkTypeRestrictions;
}
bool AccessAndMobilitySubscriptionData::coreNetworkTypeRestrictionsIsSet()
    const {
  return m_CoreNetworkTypeRestrictionsIsSet;
}
void AccessAndMobilitySubscriptionData::unsetCoreNetworkTypeRestrictions() {
  m_CoreNetworkTypeRestrictionsIsSet = false;
}
int32_t AccessAndMobilitySubscriptionData::getRfspIndex() const {
  return m_RfspIndex;
}
void AccessAndMobilitySubscriptionData::setRfspIndex(int32_t const value) {
  m_RfspIndex      = value;
  m_RfspIndexIsSet = true;
}
bool AccessAndMobilitySubscriptionData::rfspIndexIsSet() const {
  return m_RfspIndexIsSet;
}
void AccessAndMobilitySubscriptionData::unsetRfspIndex() {
  m_RfspIndexIsSet = false;
}
int32_t AccessAndMobilitySubscriptionData::getSubsRegTimer() const {
  return m_SubsRegTimer;
}
void AccessAndMobilitySubscriptionData::setSubsRegTimer(int32_t const value) {
  m_SubsRegTimer      = value;
  m_SubsRegTimerIsSet = true;
}
bool AccessAndMobilitySubscriptionData::subsRegTimerIsSet() const {
  return m_SubsRegTimerIsSet;
}
void AccessAndMobilitySubscriptionData::unsetSubsRegTimer() {
  m_SubsRegTimerIsSet = false;
}
int32_t AccessAndMobilitySubscriptionData::getUeUsageType() const {
  return m_UeUsageType;
}
void AccessAndMobilitySubscriptionData::setUeUsageType(int32_t const value) {
  m_UeUsageType      = value;
  m_UeUsageTypeIsSet = true;
}
bool AccessAndMobilitySubscriptionData::ueUsageTypeIsSet() const {
  return m_UeUsageTypeIsSet;
}
void AccessAndMobilitySubscriptionData::unsetUeUsageType() {
  m_UeUsageTypeIsSet = false;
}
bool AccessAndMobilitySubscriptionData::isMpsPriority() const {
  return m_MpsPriority;
}
void AccessAndMobilitySubscriptionData::setMpsPriority(bool const value) {
  m_MpsPriority      = value;
  m_MpsPriorityIsSet = true;
}
bool AccessAndMobilitySubscriptionData::mpsPriorityIsSet() const {
  return m_MpsPriorityIsSet;
}
void AccessAndMobilitySubscriptionData::unsetMpsPriority() {
  m_MpsPriorityIsSet = false;
}
bool AccessAndMobilitySubscriptionData::isMcsPriority() const {
  return m_McsPriority;
}
void AccessAndMobilitySubscriptionData::setMcsPriority(bool const value) {
  m_McsPriority      = value;
  m_McsPriorityIsSet = true;
}
bool AccessAndMobilitySubscriptionData::mcsPriorityIsSet() const {
  return m_McsPriorityIsSet;
}
void AccessAndMobilitySubscriptionData::unsetMcsPriority() {
  m_McsPriorityIsSet = false;
}
int32_t AccessAndMobilitySubscriptionData::getActiveTime() const {
  return m_ActiveTime;
}
void AccessAndMobilitySubscriptionData::setActiveTime(int32_t const value) {
  m_ActiveTime      = value;
  m_ActiveTimeIsSet = true;
}
bool AccessAndMobilitySubscriptionData::activeTimeIsSet() const {
  return m_ActiveTimeIsSet;
}
void AccessAndMobilitySubscriptionData::unsetActiveTime() {
  m_ActiveTimeIsSet = false;
}
int32_t AccessAndMobilitySubscriptionData::getDlPacketCount() const {
  return m_DlPacketCount;
}
void AccessAndMobilitySubscriptionData::setDlPacketCount(int32_t const value) {
  m_DlPacketCount      = value;
  m_DlPacketCountIsSet = true;
}
bool AccessAndMobilitySubscriptionData::dlPacketCountIsSet() const {
  return m_DlPacketCountIsSet;
}
void AccessAndMobilitySubscriptionData::unsetDlPacketCount() {
  m_DlPacketCountIsSet = false;
}
SorInfo AccessAndMobilitySubscriptionData::getSorInfo() const {
  return m_SorInfo;
}
void AccessAndMobilitySubscriptionData::setSorInfo(SorInfo const& value) {
  m_SorInfo      = value;
  m_SorInfoIsSet = true;
}
bool AccessAndMobilitySubscriptionData::sorInfoIsSet() const {
  return m_SorInfoIsSet;
}
void AccessAndMobilitySubscriptionData::unsetSorInfo() {
  m_SorInfoIsSet = false;
}
UpuInfo AccessAndMobilitySubscriptionData::getUpuInfo() const {
  return m_UpuInfo;
}
void AccessAndMobilitySubscriptionData::setUpuInfo(UpuInfo const& value) {
  m_UpuInfo      = value;
  m_UpuInfoIsSet = true;
}
bool AccessAndMobilitySubscriptionData::upuInfoIsSet() const {
  return m_UpuInfoIsSet;
}
void AccessAndMobilitySubscriptionData::unsetUpuInfo() {
  m_UpuInfoIsSet = false;
}
bool AccessAndMobilitySubscriptionData::isMicoAllowed() const {
  return m_MicoAllowed;
}
void AccessAndMobilitySubscriptionData::setMicoAllowed(bool const value) {
  m_MicoAllowed      = value;
  m_MicoAllowedIsSet = true;
}
bool AccessAndMobilitySubscriptionData::micoAllowedIsSet() const {
  return m_MicoAllowedIsSet;
}
void AccessAndMobilitySubscriptionData::unsetMicoAllowed() {
  m_MicoAllowedIsSet = false;
}
std::vector<std::string>&
AccessAndMobilitySubscriptionData::getSharedAmDataIds() {
  return m_SharedAmDataIds;
}
bool AccessAndMobilitySubscriptionData::sharedAmDataIdsIsSet() const {
  return m_SharedAmDataIdsIsSet;
}
void AccessAndMobilitySubscriptionData::unsetSharedAmDataIds() {
  m_SharedAmDataIdsIsSet = false;
}
OdbPacketServices AccessAndMobilitySubscriptionData::getOdbPacketServices()
    const {
  return m_OdbPacketServices;
}
void AccessAndMobilitySubscriptionData::setOdbPacketServices(
    OdbPacketServices const& value) {
  m_OdbPacketServices      = value;
  m_OdbPacketServicesIsSet = true;
}
bool AccessAndMobilitySubscriptionData::odbPacketServicesIsSet() const {
  return m_OdbPacketServicesIsSet;
}
void AccessAndMobilitySubscriptionData::unsetOdbPacketServices() {
  m_OdbPacketServicesIsSet = false;
}
std::vector<std::string>&
AccessAndMobilitySubscriptionData::getSubscribedDnnList() {
  return m_SubscribedDnnList;
}
bool AccessAndMobilitySubscriptionData::subscribedDnnListIsSet() const {
  return m_SubscribedDnnListIsSet;
}
void AccessAndMobilitySubscriptionData::unsetSubscribedDnnList() {
  m_SubscribedDnnListIsSet = false;
}
int32_t AccessAndMobilitySubscriptionData::getServiceGapTime() const {
  return m_ServiceGapTime;
}
void AccessAndMobilitySubscriptionData::setServiceGapTime(int32_t const value) {
  m_ServiceGapTime      = value;
  m_ServiceGapTimeIsSet = true;
}
bool AccessAndMobilitySubscriptionData::serviceGapTimeIsSet() const {
  return m_ServiceGapTimeIsSet;
}
void AccessAndMobilitySubscriptionData::unsetServiceGapTime() {
  m_ServiceGapTimeIsSet = false;
}
TraceData AccessAndMobilitySubscriptionData::getTraceData() const {
  return m_TraceData;
}
void AccessAndMobilitySubscriptionData::setTraceData(TraceData const& value) {
  m_TraceData      = value;
  m_TraceDataIsSet = true;
}
bool AccessAndMobilitySubscriptionData::traceDataIsSet() const {
  return m_TraceDataIsSet;
}
void AccessAndMobilitySubscriptionData::unsetTraceData() {
  m_TraceDataIsSet = false;
}

}  // namespace model
}  // namespace udm
}  // namespace oai
